import { post, postForm, postQuery, postMultipart } from '../request'

const prefix = '/ytdzdt-server'


// 总览
// 地图服务统计
export function shareserviceMapservice(data) {
  return post('/geoserver-open/rest/query/shareservice_mapservice', data)
}
// export function shareserviceDatum(data) {
//   return post('/geoserver-open/rest/query/shareservice_datum', data)
// }
// 数据分发统计
export function shareserviceDatadistribute(data) {
  return post('/geoserver-open/rest/query/shareservice_datadistribute', data)
}
// 烟水基础设施统计
// export function shareserviceYsss(data) {
//   return post('/geoserver-open/rest/query/shareservice_ysss', data)
// }

// 查询|getShareSeriveList
export function getShareSeriveListApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/getShareSeriveList/v1', data)
}

// 查询|findById
export function findByIdApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/findById/v1', data)
}

// 删除|deleteById
export function deleteByIdApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/deleteById/v1', data)
}

// 创建|getShareSeriveList
export function createShareSeriveApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveApplyCheckService/create/v1', data)
}
// 查询用户的申请|getShareSeriveList
export function getShareSeriveApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveApplyCheckService/getPageApplyShareService/v1', data)
}
// 查询用户的申请|getShareSeriveList
export function findShareSeriveById(data) {
  return post(prefix + '/MapDomain/ShareSeriveApplyCheckService/findById/v1', data)
}
// 审核|getShareSeriveList
export function checkService(data) {
  return post(prefix + '/MapDomain/ShareSeriveApplyCheckService/check/v1', data)
}

// 查询数据可分发的|getShareSeriveList
export function getTaskList(data) {
  return postForm(prefix + '/TaskDomain/TaskService/getTaskList/v1', data)
}
// 查询用户申请的，审核的|getTaskObjList
export function getTaskObjList(data) {
  return post(prefix + '/TaskDomain/TaskService/getTaskObjList/v1', data)
}
// 运维管理 发布服务
export function createService(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/create/v1', data)
}
// 运维管理 更新服务
export function updateService(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/update/v1', data)
}
// 上传图片文件
export function getUplodImageurl(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/getUplodImageurl/v1', data)
}

// 查询服务详情
export function findServiceById(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/findById/v1', data)
}
// 删除服务
export function deleteServiceById(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/deleteById/v1', data)
}

// 分页查询 
export function getPageShareSeriveModel(data) {
  return post(prefix + '/MapDomain/ShareSeriveModelService/getPageShareSeriveModel/v1', data)
}
//获取app历史版本
export function getHistoryList(data) {
  return postForm(prefix + '/SystemDomain/AppPublishService/getHistoryList/v1', data)
}
//删除app版本
export function deleteByIdAppVersion(data) {
  return postForm(prefix + '/SystemDomain/AppPublishService/deleteById/v1', data)
}
//新增app版本
export function createAppVersion(data) {
  return postMultipart(prefix + '/SystemDomain/AppPublishService/create/v1', data)
}

//编辑app版本
export function updateAppVersion(data) {
  return post(prefix + '/SystemDomain/AppPublishService/update/v1', data)
}
//运维管理-数据分发管理
export function getPageApplyShareServiceApi(data) {
  return post(prefix + '/MapDomain/ShareSeriveApplyCheckService/getPageApplyShareService/v1', data)
}

//运维管理-获取一张图服务配置
export function getOneMapConfigApi(data) {
  return post(prefix + '/TaskDomain/TbServerMapConfigService/getOneMapConfig/v1', data)
}
//运维管理-获取采集系统数据配置
export function getCollectConfigApi(data) {
  return post(prefix + '/TaskDomain/TbServerMapConfigService/getCollectConfig/v1', data)
}
//运维管理-更新地图服务配置
export function getMapUpdateConfigApi(data) {
  return postForm(prefix + '/TaskDomain/TbServerMapConfigService/updateInfo/v1', data)
}

//运维管理-查询系统配置列表
export function findAllConfigApi(data) {
  return postForm(prefix + '/SystemDomain/SysConfigService/findAll/v1', data)
}
//运维管理-创建系统配置
export function createConfigApi(data) {
  return postMultipart(prefix + '/SystemDomain/SysConfigService/create/v1', data)
}

//运维管理-删除系统配置
export function deleteConfigApi(data) {
  return postForm(prefix + '/SystemDomain/SysConfigService/deleteById/v1', data)
}
//运维管理-更新系统配置
export function updateConfigApi(data) {
  return postMultipart(prefix + '/SystemDomain/SysConfigService/update/v1', data)
}
export function updateConfigApi2(data) {
  return postForm(prefix + '/SystemDomain/SysConfigService/update/v1', data)
}

//运维管理-获取角色列表
export function getRoleListApi(data) {
  return postForm(prefix + '/UserDomain/RoleService/getRoleList/v1', data)
}
//运维管理-创建角色
export function createRoleApi(params) {
  return post(prefix + '/UserDomain/RoleService/createRole/v1', params)
}

//运维管理-编辑角色
export function updateRole(params) {
  return post(prefix + '/UserDomain/RoleService/updateRole/v1', params)
}

//运维管理-删除角色
export function delteRoleApi(params) {
  return postQuery(prefix + '/UserDomain/RoleService/deleteRole/v1', params)
}

//运维管理-获取用户列表
export function getuserListApi(params) {
  return post(prefix + '/UserDomain/UserInfoService/userListPoolPage/v1', params)
}

//设置用户角色
export function setUserRoleApi(data) {
  return postForm(prefix + '/UserDomain/UserInfoService/setUserRole/v1', data)
}

/*
 * 获取用户授权的角色信息
*/
export function getUserRoleApi(data) {
  return postForm(prefix + '/UserDomain/AuthService/getUserRole/v1', data)
}


